<template>
  <svg class='svg-icon' aria-hidden='true'>
    <use :xlink:href='iconName'></use>
  </svg>
</template>

<script>
export default {
  props: {
    iconClass: {
      type: String,
      required: true
    }
  },
  computed: {
    iconName () {
      return `#icon-${this.iconClass}`
    }
  }
}
</script>

<style scoped>
.svg-icon {
  height: 100%;
  fill: currentColor;
  overflow: hidden;
}
</style>
